package com.demo.testpackage;

import com.demo.entity.Student;

import java.util.Arrays;
import java.util.List;
import java.util.PrimitiveIterator;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author zhiqiang
 */
public class T2 {
    public static void main(String[] args) {
        Student s = new Student();
        s.setName("zs");
//        s.setId("1");
//        System.out.println(s);
//        System.out.println(CodeEnum.zhiqiang.getDesc());
        String a = "1";
        String b = "2";
        List<String> list = Stream.of(a, b).collect(Collectors.toList());
//        list.forEach(s1 -> System.out.println(s1));
        int[] nums = {0, 0, 1, 1, 1, 2, 2, 3, 3, 4};
        PrimitiveIterator.OfInt iterator = Arrays.stream(nums).distinct().iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
        System.out.println(Arrays.toString(nums));
    }
}
